package com.zjy.web.exception;

import com.zjy.web.domain.model.IResultCode;
import com.zjy.web.domain.model.Result;

import java.io.Serializable;

/**
 * @author zhangjianyu
 * email: 578547270@qq.com
 * create_time: 2024-10-18 14:35
 * description:
 */
public enum PublicErrorCode implements IResultCode, Serializable {

    LOGIN(401, "登录失效"),
    ;

    private Integer code;

    private String msg;

    PublicErrorCode(String msg) {
        this.code = Result.FAIL;
        this.msg = msg;
    }

    PublicErrorCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
